<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    function fn(){

    }
    fn.userName = "zhangsan";
    // 增加方法
    fn.run = function(){
        console.log("run");
    }
    console.log(fn.name);// fn
    // 调用方法
    fn.run();// run
    console.log(fn.userName);// zhangsan
</script>
</html>